package Dao;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import Bean.ReplyBean;

public class ReplyDao extends SqlMapClientDaoSupport{
	public void replyInsert(ReplyBean rb){
		getSqlMapClientTemplate().insert("replyInsert", rb);
	}
	
	public void replyreplyInsert(ReplyBean rb){
		getSqlMapClientTemplate().insert("replyreplyInsert", rb);
	}
	
	public int replyNewSelect(ReplyBean rb){
		return (int)getSqlMapClientTemplate().queryForObject("replyNewSelect", rb);
	}
	
	public List<ReplyBean> replyNewInsert(Integer sr_no){
		return(List<ReplyBean>) getSqlMapClientTemplate().queryForList("replyNewInsert", sr_no);
	}
	
	public List<ReplyBean> replySelect(Integer sr_sb_no){
		return (List<ReplyBean>) getSqlMapClientTemplate().queryForList("replySelect",sr_sb_no);
	}
	
	public List<ReplyBean> replyreplyList(Integer sr_no){
		return (List<ReplyBean>) getSqlMapClientTemplate().queryForList("rereplyList",sr_no);
	}
	
	public List<ReplyBean> replyUpdate(Integer sr_no){
		return (List<ReplyBean>) getSqlMapClientTemplate().queryForList("updateform", sr_no);
	}
	
	public void replySupdate(ReplyBean reply){
		getSqlMapClientTemplate().update("replyupdate", reply);
	}
	
	public void replyDelete(Integer sr_no){
		getSqlMapClientTemplate().delete("replydelete", sr_no);
	}
	
}
